#1到100的奇数求和
def sum1_100():
    num=0
    for i in range(0,101):
        if i%2==1:
            num=num+i
    print(num)

#打印99乘法表
def print_99():
    row = 1
    while row <= 9:
        col = 1
        while col <= row:
            print('%d * %d = %d' % (col, row, row+col), end='\t')
            col += 1
        print('')
        row += 1

#统计一个整数二进制出现的1的个数
def bin_1_sum():
    i=int(input('请输入一个数：'))
    j=bin(i)
    print(j)
    b=str(bin(i))
    print(b)
    sum_list=list(b)
    print(sum_list)
    num = 0
    for i in range(2,len(sum_list)):
        if sum_list[i]=='1':
            num+=1
    print(num)

#横着打印一排从1-20
def print_1_20():
    for i in range(1,21):
        print(i,'\t',end='')


if __name__=='__main__':
    # sum1_100()
    # print_99()
    # bin_1_sum()
    print_1_20()
